﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ModulesView.aspx.cs" Inherits="Churchtoolkit.Web.ModulesView"
    Title="Modules List" MasterPageFile="~/Account/UserProfileView.master"  %>

<asp:Content ID="content"  ContentPlaceHolderID="tabContainer" runat="Server">
    <div style="padding:10px;">
        <asp:GridView runat="server" ID="gvMemberModules" OnRowCommand="gv_OnRowCommand" ShowHeader="false" DataKeyNames="ModuleId">
        <Columns>
            <asp:TemplateField>
                <ItemTemplate>
                    <asp:Image runat="server" SkinID="ModuleIcon" />
                </ItemTemplate>
            </asp:TemplateField> 
            <asp:BoundField DataField="ModuleName" >
                <ItemStyle Width="90%"></ItemStyle>
            </asp:BoundField>
            <asp:ButtonField ButtonType="Button" Text="Configure" CommandName="Config">
                <ControlStyle CssClass="button"></ControlStyle>
            </asp:ButtonField>
            <asp:ButtonField ButtonType="Button" Text="Remove" CausesValidation="false" CommandName="Remove">
                    <ControlStyle CssClass="button"></ControlStyle>
            </asp:ButtonField>
        </Columns>
    </asp:GridView>
    </div>
    <hr />
    <div style="padding:10px;">
        <asp:TextBox ID="txtSearch" runat="server" Width="90%"></asp:TextBox>
        <asp:Button ID="btnSearch" Text="Search" runat="server" OnClick="btnSearch_Click" OnRowCommand="gv_OnRowCommand" />
        <br />
        <asp:GridView runat="server" ID="gvSearchResult" ShowHeader="false" OnRowCommand="gv_OnRowCommand" DataKeyNames="ModuleId">
        <Columns>
            <asp:TemplateField>
                <ItemTemplate>
                    <asp:Image runat="server" SkinID="ModuleIcon" />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="ModuleName">
                <ItemStyle Width="90%" />
            </asp:BoundField>
            <asp:ButtonField ButtonType="Button" CommandName="Add" Text="Add" >
                <ControlStyle CssClass="button"></ControlStyle>
            </asp:ButtonField>
        </Columns>
    </asp:GridView>
    </div>
</asp:Content>
